<?php

function _ctlLoginbox($name, $attribs)
{
	$dispatcher =& FLEA::getSingleton(FLEA::getAppInf('dispatcher'));
	/* @var $dispatcher FLEA_Dispatcher_Auth */
	
	$user = $dispatcher->getUser();
	if(!empty($user)){
		echo '欢迎您：'.$user['username'].'&nbsp;&nbsp;&nbsp;<a href="?controller=admin_login&action=logout">安全退出</a>';
		echo ' | <a href="?controller=admin_login&action=cpindex">管理首页</a> | <a href="#">帮助</a>';
	}
}

?>